Skip to content

Add exception handling support and state management in ManagedDebugger#12

Closed
lextm wants to merge 5 commits into
MattParkerDev:mainfrom
lextudio:exception-support
Closed

Add exception handling support and state management in ManagedDebugger#12
lextm wants to merge 5 commits into
MattParkerDev:mainfrom
lextudio:exception-support

Conversation

@lextm
Copy link
Copy Markdown
Contributor

@lextm lextm commented Apr 28, 2026

When using SharpDbg in a VS Code extension to debug a sample that crashes on unhandled exception,

  • VS Code only breaks and shows an exception happened
  • Variables pane shows nothing about the exception

Further analysis shows that SharpDbg DAP implementation misses exception info request handling.

Initial code required is added in this pull request.

I agree to the terms of contributing as stated here

@lextm lextm force-pushed the exception-support branch from 2fcb827 to 7023e47 Compare April 28, 2026 03:27
Comment thread src/SharpDbg.Infrastructure/Debugger/ManagedDebugger_VariableValues.cs Outdated
Comment thread src/SharpDbg.Infrastructure/Debugger/ManagedDebugger_RequestHandlers.cs Outdated
Comment thread src/SharpDbg.Infrastructure/Debugger/ManagedDebugger_RequestHandlers.cs Outdated
Comment thread src/SharpDbg.Infrastructure/Debugger/ManagedDebugger_RequestHandlers.cs Outdated
Comment thread src/SharpDbg.Infrastructure/Debugger/ManagedDebugger_EventHandlers.cs Outdated
lextm and others added 5 commits May 2, 2026 00:53
…ndlers.cs

Co-authored-by: Matt Parker <61717342+MattParkerDev@users.noreply.github.com>
…ndlers.cs

Co-authored-by: Matt Parker <61717342+MattParkerDev@users.noreply.github.com>
Co-authored-by: Copilot <copilot@github.com>
@lextm lextm force-pushed the exception-support branch from f2bef26 to d2946b5 Compare May 2, 2026 04:54
@lextm
Copy link
Copy Markdown
Contributor Author

lextm commented May 2, 2026

Just rebased to HEAD.

@MattParkerDev
Copy link
Copy Markdown
Owner

FYI VSCode/vsdbg does not use a new "exception" scope for exceptions - it just uses a $exception variable in the Locals scope.

image

@MattParkerDev
Copy link
Copy Markdown
Owner

FYI I have implemented returning the $exception in the locals scope in main, but not GetExceptionInfo yet.

@MattParkerDev
Copy link
Copy Markdown
Owner

@lextm I have implemented the ExceptionInfo request in main :)

@lextm
Copy link
Copy Markdown
Contributor Author

lextm commented May 25, 2026

Superseded by main branch implementation.

@lextm lextm closed this May 25, 2026
@lextm lextm deleted the exception-support branch May 25, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants